package com.cxyzy.app_parceler

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_second.*
import org.parceler.Parcels

class SecondActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_second)

        val user = Parcels.unwrap<User>(intent.getParcelableExtra("extraKey"))
        infoTextView.text = user.name
    }
}
